CREATE TABLE [ext].[foto]
(
[id_foto] [int] NOT NULL IDENTITY(1, 1),
[id_evento] [int] NOT NULL,
[foto] [image] NULL,
[descricao] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
ALTER TABLE [ext].[foto] ADD 
CONSTRAINT [PK_foto] PRIMARY KEY CLUSTERED  ([id_foto]) ON [PRIMARY]
ALTER TABLE [ext].[foto] ADD
CONSTRAINT [FK_foto_evento] FOREIGN KEY ([id_evento]) REFERENCES [ext].[evento] ([id_evento])
GO
